package com.mars.module.app.controller;


import com.mars.common.enums.BusinessType;
import com.mars.common.response.PageInfo;
import com.mars.common.result.R;
import com.mars.common.util.ExcelUtils;
import com.mars.framework.annotation.Log;
import com.mars.framework.annotation.RateLimiter;
import com.mars.module.admin.entity.ApComment;
import com.mars.module.admin.request.ApCommentRequest;
import com.mars.module.admin.service.IApCommentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;

/**
 * 用户评论控制层
 *
 * @author mars
 * @date 2024-03-16
 */
@Slf4j
@AllArgsConstructor
@RestController
@Api(value = "用户评论接口管理", tags = "用户评论接口管理")
@RequestMapping("/app/apComment")
public class AppCommentController {

    private final IApCommentService iApCommentService;


    /**
     * 发布评论
     */
    @RateLimiter
    @ApiOperation(value = "发布评论")
    @PostMapping("/publish")
    public R<Void> publish(@RequestBody ApCommentRequest apCommentRequest) {
        iApCommentService.publish(apCommentRequest);
        return R.success();
    }


}
